<?php
/**
 * 同期展会
 * User: adophper
 * Date: 2018/3/23
 * Time: 18:23
 */
namespace frontend\widgets;
use common\services\ExhibitionServices;
use yii\bootstrap\Widget;

class SameExhibition extends Widget {

    private $view = '@frontend/views/widget/same-exhibition.php';

    public $params = [];

    public $exhibition_id;

    public function init()
    {
        $service = new ExhibitionServices();
        $data = $service->getExhibitionSame($this->exhibition_id);
        $this->params['data'] = $data;
    }

    public function run()
    {
        echo $this->renderFile($this->view, $this->params);
    }
}